<!--
 * @Author: zk
 * @Date: 2021-01-21 16:22:54
 * @LastEditors: zk
 * @LastEditTime: 2021-01-21 17:11:41
 * @Description:
-->
<template>
  <el-form-item
    :label="label"
    :prop="prop"
  >
    <el-select
      :value="value"
      @change="change"
    >
      <el-option
        v-for="op in options"
        :key="op.value"
        :label="op.label"
        :value="op.value"
      />
    </el-select>
  </el-form-item>
</template>
<script>
export default {
  name: 'MySelect',
  components: {},
  model: {
    prop: 'value',
    event: 'change'
  },
  props: {
    options: {
      type: Array,
      default: () => []
    },
    label: {
      type: String,
      default: ''
    },
    value: {
      type: String,
      default: ''
    },
    prop: {
      type: String,
      default: ''
    }
  },
  methods: {
    change(value) {
      this.$emit('change', value)
    }
  }
}
</script>
